<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "lunbo".
 *
 * @property integer $lb_id
 * @property string $lb_name
 * @property string $image
 * @property integer $show1
 * @property integer $sort
 * @property string $link
 */
class Lunbo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'lunbo';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['lb_name', 'image', 'show1', 'sort', 'link'], 'required'],
            [['lb_id', 'show1', 'sort'], 'integer'],
            [['lb_name'], 'string', 'max' => 20],
            [['image', 'link'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'lb_id' => '轮播id',
            'lb_name' => '图片名称',
            'image' => '图片',
            'show1' => '状态',
            'sort' => '排序',
            'link' => '图片链接',
        ];
    }
}
